package lad02.test11;


public class Rectangle implements Printx {
    int length;
    int wide;

    public int getArea() {        //获取面积
        return length * wide;
    }

    public int getPerimeter() {     //获取周长
        return (length + wide) * 2;
    }
    @Override
    public void printMyMay() {System.out.println("长:" + length);
        System.out.println("宽:" + wide);
        System.out.println("面积:" + getArea());
        System.out.println("周长:" + getPerimeter());

    }
}
